<div style="position: relative;min-width: 1600px;padding: 24px;background: white">
  <!--    基础信息-->
  <div>
    <h2>基础信息</h2>
    <nz-row>
      <nz-col nzSpan="6">
        <span class="label">出库标题</span>
        <span [nzTooltipTitle]="detail?.delivery?.title" nzTooltipPlacement="topCenter"
              nz-tooltip>{{detail?.delivery?.title}}</span>
      </nz-col>
      <nz-col nzSpan="6">
        <span class="label">出库单号</span>
        <span [nzTooltipTitle]="detail?.delivery?.deliveryNumber" nzTooltipPlacement="topCenter"
              nz-tooltip>{{detail?.delivery?.deliveryNumber}}</span>
      </nz-col>
      <nz-col nzSpan="6">
        <span class="label">出库类型</span>
        <span>{{outStoreTypeName(detail?.delivery?.type)}}</span>
      </nz-col>
      <nz-col nzSpan="6">
        <span class="label">创建人员</span>
        <span [nzTooltipTitle]="detail?.delivery?.founder" nzTooltipPlacement="topCenter"
              nz-tooltip>{{detail?.delivery?.founder}}</span>
      </nz-col>
    </nz-row>
    <nz-row>
      <nz-col nzSpan="6">
        <span class="label">创建时间</span>
        <span>{{detail?.delivery?.createTime}}</span>
      </nz-col>
      <nz-col nzSpan="6">
        <span class="label">打包时间</span>
        <span>{{detail?.delivery?.packTime}}</span>
      </nz-col>
      <nz-col nzSpan="6">
        <span class="label">出库时间</span>
        <span>{{detail?.delivery?.deliveryTime}}</span>
      </nz-col>
      <nz-col nzSpan="6">
        <span class="label">签收/取消时间</span>
        <span>{{detail?.delivery?.dealTime}}</span>
      </nz-col>
    </nz-row>
    <nz-row>
      <nz-col nzSpan="6">
        <span class="label">状态</span>
        <span>{{STATUS[detail?.delivery?.state]}}</span>
      </nz-col>
      <nz-col nzSpan="6">
        <span class="label">出库数量</span>
        <span>{{detail?.delivery?.number}}</span>
      </nz-col>
      <nz-col nzSpan="6">
        <span class="label">关联单号</span>
        <span [nzTooltipTitle]="detail?.delivery?.orderNum" nzTooltipPlacement="topCenter"
              nz-tooltip>
      <a routerLink="/used-store/usedOrderDetails" style="color: #1890ff" *ngIf="detail?.delivery?.type===1"
         [queryParams]="{id:detail?.delivery?.orderId}"
         target="_blank">{{detail?.delivery?.orderNum}}</a>
      <a routerLink="/aisi-recyc/loveOrderDetails" style="color: #1890ff" *ngIf="detail?.delivery?.type===2"
         [queryParams]="{id:detail?.delivery?.orderId}"
         target="_blank">{{detail?.delivery?.orderNum}}</a>
        </span>
      </nz-col>
    </nz-row>
    <nz-row>
      <nz-col nzSpan="12">
        <span class="label">备注</span>
        <span  [nzTooltipTitle]="detail?.delivery?.remark" nzTooltipPlacement="topCenter"
               nz-tooltip>{{detail?.delivery?.remark}}</span>
      </nz-col>
    </nz-row>
  </div>
  <!--    收货人信息-->
  <div>
    <h2>收货人信息</h2>
    <nz-row>
      <nz-col nzSpan="6">
        <span class="label">供应商</span>
        <span [nzTooltipTitle]="detail?.delivery?.supplier" nzTooltipPlacement="topCenter"
              nz-tooltip>{{detail?.delivery?.supplier}}</span>
      </nz-col>
      <nz-col nzSpan="6">
        <span class="label">收货人</span>
        <span [nzTooltipTitle]="detail?.delivery?.consignee" nzTooltipPlacement="topCenter"
              nz-tooltip>{{detail?.delivery?.consignee}}</span>
      </nz-col>
      <nz-col nzSpan="6">
        <span class="label">联系方式</span>
        <span>{{detail?.delivery?.tel}}</span>
      </nz-col>
    </nz-row>
    <nz-row>
      <nz-col nzSpan="6">
        <span class="label">地区</span>
        <span>{{detail?.delivery?.region}}</span>
      </nz-col>
      <nz-col nzSpan="6">
        <span class="label">详细地址</span>
        <span [nzTooltipTitle]="detail?.delivery?.address" nzTooltipPlacement="topCenter"
              nz-tooltip>{{detail?.delivery?.address}}</span>
      </nz-col>
    </nz-row>
  </div>

  <!-- 销售信息 -->
  <div>
    <h2>销售信息</h2>
    <nz-row>
      <nz-col nzSpan="6">
        <span class="label">销售总价</span>
        <span>{{ detail?.delivery?.sumPrice || '0' }}</span>
      </nz-col>

      <nz-col nzSpan="6">
        <span class="label">销售时间</span>
        <span>{{ detail?.delivery?.saleTime || '-' }}</span>
      </nz-col>

      <nz-col nzSpan="6">
        <span class="label">销售人员</span>
        <span>{{ detail?.delivery?.salesman || '-' }}</span>
      </nz-col>
    </nz-row>
  </div>

  <!--    物流信息-->
  <div *ngIf="detail?.orderExpress">
    <h2>物流信息</h2>
    <div>
      <nz-row>
        <nz-col nzSpan="6">
          <span class="label">发货方式</span>
          <span>{{detail?.delivery?.deliveryMethod===1?'顺丰快递':detail?.delivery?.deliveryMethod===2?'其他快递':detail?.delivery?.deliveryMethod===3?'线下配送':''}}</span>
        </nz-col>
        <nz-col nzSpan="6">
          <span class="label">物流公司</span>
          <span>{{detail?.orderExpress.expressName}}</span>
        </nz-col>
        <nz-col nzSpan="6">
          <span class="label">物流单号</span>
          <span>{{detail?.orderExpress.expressNum}}</span>
        </nz-col>
      </nz-row>
      <nz-row>
        <nz-col nzSpan="6">
          <span class="label">邮费承担</span>
          <span>{{detail?.delivery?.isFreight===0?'我司承担':'用户承担'}}</span>
        </nz-col>
        <nz-col nzSpan="6">
          <span class="label">快递费</span>
          <span>{{detail?.delivery?.freight}}</span>
        </nz-col>
      </nz-row>
      <nz-row *ngIf="detail?.orderExpress?.expressTracesl?.length">
        <nz-col nzSpan="24" style="text-align: center;max-height: 300px;overflow-y: auto;padding: 8px;overflow-x: hidden;border: 1px solid rgba(0,0,0,.1)">
          <nz-timeline [nzMode]="'left'">
            <nz-timeline-item [nzLabel]="info.time" *ngFor="let info of detail?.orderExpress.expressTraces">{{info.station}}</nz-timeline-item>
          </nz-timeline>
        </nz-col>
      </nz-row>
    </div>
  </div>
  <!--    出库明细-->
  <div>
    <h2 style="display: flex;">
      出库明细
    </h2>
    <p class="detailed-splic">
      {{ returnSplicDetailed() }}
    </p>
    <nz-table #basicTable
              [nzPageSize]="9999"
              nzShowPagination="false"
              nzOuterBordered="true"
              [nzData]="detail?.list">
      <thead>
      <tr>
        <th nzAlign="center">序号</th>
        <th nzAlign="center">状态</th>
        <th nzAlign="center">机器编码</th>
        <th nzAlign="center">库位</th>
        <th nzAlign="center">B端成色</th>
        <th nzAlign="center">C端成色</th>
        <th nzAlign="center">品牌</th>
        <th nzAlign="center">机型</th>
        <th nzAlign="center">颜色</th>
        <th nzAlign="center">版本</th>
        <th nzAlign="center">内存</th>
        <th nzAlign="center">IMEI</th>
        <th nzAlign="center">首次入库时间</th>
        <th nzAlign="center">成交入库时间</th>
        <th nzAlign="center">回收价</th>
        <th nzAlign="center">出库单价</th>
      </tr>
      </thead>
      <tbody>
      <tr *ngFor="let data of basicTable.data;let index=index">
        <td nzAlign="center">{{ index + 1 }}</td>
        <td nzAlign="center"></td>
        <td nzAlign="center">{{ data['equipmentCode'] }}</td>
        <td nzAlign="center">{{ data['libraryName'] }}</td>
        <td nzAlign="center">{{ data['colourNameB'] }}</td>
        <td nzAlign="center">{{ data['colourName'] }}</td>
        <td nzAlign="center">{{ data['typeName'] }}</td>
        <td nzAlign="center">{{ data['modelName'] }}</td>
        <td nzAlign="center">{{ data['color'] }}</td>
        <td nzAlign="center">{{ data['version'] }}</td>
        <td nzAlign="center">{{ data['memory'] }}</td>
        <td nzAlign="center">{{ data['imei'] }}</td>
        <td nzAlign="center">{{ data['firstTime'] }}</td>
        <td nzAlign="center">{{ data['clinchTime'] }}</td>
        <td nzAlign="center">{{ (data['realValuation'] || 0) + (data['aprc'] || 0) + (data['cprc'] || 0) }}</td>
        <td nzAlign="center">{{ data['price'] }}</td>
      </tr>
      <tr *ngIf="detail?.list?.length">
        <td nzAlign="center">合计</td>
        <td nzAlign="center"></td>
        <td nzAlign="center"></td>
        <td nzAlign="center"></td>
        <td nzAlign="center"></td>
        <td nzAlign="center"></td>
        <td nzAlign="center"></td>
        <td nzAlign="center"></td>
        <td nzAlign="center"></td>
        <td nzAlign="center"></td>
        <td nzAlign="center"></td>
        <td nzAlign="center"></td>
        <td nzAlign="center"></td>
        <td nzAlign="center"></td>
        <td nzAlign="center">{{getCount('realValuation')}}</td>
        <td nzAlign="center">{{getCount('price')}}</td>
      </tr>
      </tbody>
    </nz-table>
  </div>
  <div class="btnRow">
    <button nz-button nzType="primary" (click)="edit()" *ngIf="detail?.delivery?.state===1">编辑</button>
    <button nz-button nzType="primary" (click)="back()">返回</button>
  </div>
</div>
